import wxParse from '../../wxParse/wxParse.js';
import { baseConfig } from '../../api/api.js';

const app = getApp();

Page({

  /**
   * 页面的初始数据
   */
  data: {
    parameter: {
      'navbar': '1',
      'return': '1',
      'title': '常见问题',
      'color': false
    },
    id:0,
content:''
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    this.getArticleOne();
  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function () {

  },

  getArticleOne:function(){
    var that = this;
    baseConfig().then(res=>{
      let  article_content =  res.data.question.replace(/<img/gi, '<img style="max-width:100%;height:auto;float:left;display:block" ')
      .replace(/<section/g, '<div')
     .replace(/\/section>/g, '\div>');
    this.setData({content:article_content})
    });
  },
})